package com.shundr.common;

import android.os.Bundle;
import android.util.DisplayMetrics;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.shundr.R;
import com.shundr.base.BaseActivity;
import com.shundr.frame.constant.LContext;

/**
 * 二维码
 * QrActivity
 * 
 * @author larry 2015-5-25 下午4:03:06 
 * @version 1.0.0
 *
 */
public class QrActivity extends BaseActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_qr);
		ImageView ivQr = (ImageView)findViewById(R.id.iv_qr);
		RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) ivQr.getLayoutParams();
		DisplayMetrics dm = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(dm);
		LContext.width = dm.widthPixels; // 当前屏幕像素
		LContext.height = dm.heightPixels; // 当前屏幕像素
		params.width = (int) (LContext.width * 0.6);
		params.height = (int) (LContext.width * 0.6);
	}
	
}
